<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;
use App\Http\Model\AudioApi;


class TopupRebateRecharge extends Base
{
    protected $table = 'topup_rebate_recharge';

    protected $fillable = ['user_id', 'order_id', 'price', 'diamond_value'];

    public function __construct(array $attributes = [])
    {
        parent::__construct($this->table, $attributes);
    }

    public static function createData(int $user_id, int $order_id, int $price, int $diamond_value) {
        return self::create([
            'user_id' => $user_id,
            'order_id' => $order_id,
            'price' => $price,
            'diamond_value' => $diamond_value
        ]);
    }
}